#ifndef CONSOLE_H
#define CONSOLE_H

#include "EngineApi.h"

#include <windows.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <iostream>
#include <fstream>

class ENGINE_API Console
{
public:
   // must be used befor ANITHING is sent to the outstream
   void create(WORD maxConsoleLines = 1000);

private:
   WORD   m_maxConsoleLines;
   int    m_consoleHandle;
   long   m_stdHandle;

   COORD m_windowSize;

   CONSOLE_SCREEN_BUFFER_INFO m_consoleBufferInfo;
   FILE* m_pFile;

   void redirectIOToConsole();
};

#endif//CONSOLE_H